package wiz.client;

import com.google.gwt.dom.client.AudioElement;

import wiz.client.events.WizEventHandler;

public class SoundEventHandler implements WizEventHandler {

	private AudioElement fAudioElement;

	public SoundEventHandler(AudioElement audioElement) {
		fAudioElement = audioElement;
	}

	@Override
	public void gameStarted() {
		fAudioElement.setSrc("smw_key.wav");
		fAudioElement.play();

	}

	@Override
	public void bidIncreased() {
		fAudioElement.setSrc("smw_coin.wav");
		fAudioElement.play();
		
	}

	@Override
	public void bidDecreased() {
		fAudioElement.setSrc("smw_kick.wav");
		fAudioElement.play();		
	}

	@Override
	public void roundStarted() {
		fAudioElement.setSrc("smw_springjump.wav");
		fAudioElement.play();				
	}

	@Override
	public void tricksMadeIncreased() {
		fAudioElement.setSrc("smw_coin.wav");
		fAudioElement.play();		
	}

	@Override
	public void tricksMadeDecreased() {
		fAudioElement.setSrc("smw_kick.wav");
		fAudioElement.play();			
	}

	@Override
	public void roundFinished() {
		fAudioElement.setSrc("smas-smb3_level_clear_or_open_inventory.wav");
		fAudioElement.play();		
	}

	@Override
	public void roundAdded() {
		fAudioElement.setSrc("smw_powerup.wav");
		fAudioElement.play();			
	}

}
